Choosing the right tool for the job.
- Different tasks, such as checking for an edge or finding all of a node's neighbors, favor different data structures for efficiency.
- We constantly face a space-time trade-off: optimizing for low memory might make an operation, like testing for adjacency, slower.
- Today, we will focus on three standard representations that occupy different points on this spectrum: the edge list, adjacency list, and adjacency matrix.